package coreStore;

public class Number_of_1_Bits {
	public int hammingWeight(int n) {
		int rst = 0;
		while(n!=0){
			//int a = n&1;
			if((n&1) ==1)
				rst++;
			n = n>>1;
		}
		return rst;
    }
	public static void main(String[] args){
		Number_of_1_Bits num = new Number_of_1_Bits();
		System.out.println(num.hammingWeight(2));//2147483648
	}
}
